function [KA,Weights,name] = geometricSelfCalib(VF,w,h,numparams,corrs)
%this function , given a camera center and a focal length and a series of fundamental
%matrices computes the error with respect to a fundamental matrix
cc=1;
for j=1:size(VF,2)
    if(size(VF{1,j},2)>0)
    TF{1,cc}=VF{1,j}/norm(VF{1,j},2);
    cc=cc+1;
    end
end

name='geometric';
plotting=0;
[m,numFs]=size(TF);
[Weights]=findGeometricWeights(TF,corrs);
funcOption='regularweighted';
normalize=0;
numtries=1;

  Weights=(Weights/sum(abs(Weights)))*numFs;
  
[allsols,  scrs, bestslns] =nonlinearOptimizeselfcalibnormMOD(TF, w,h, numparams ,Weights,numtries);




if(plotting==1)
    plotSelfCalibResults(allsols,  scrs, bestslns,Weights,numparams);   
end

KA=bestslns;
end

